package com.yjhb.android.sbz.mvp.report;

import com.yjhb.android.sbz.entity.Task;
import com.yjhb.android.sbz.http.HttpObserver;
import com.yjhb.android.sbz.http.HttpTool;
import com.yjhb.android.sbz.mvp.ConventionPresenter;

/**
 * 创建者 zx
 * 创建时间 2021/2/26 16:12
 */
public class TipOffPresenter extends ConventionPresenter<TipOffView> {
    private final String TAG = "TipOffPresenter";

    public TipOffPresenter(TipOffView tipOffView) {
        super(tipOffView);
    }

    @Override
    protected void onDestroy() {

    }


    public void queryTaskByOrderId(String orderId){
        HttpTool.request(model.queryTaskByOrderId(orderId), new HttpObserver<Task>() {
            @Override
            public void onResult(Task data) {
                if (view!=null){
                    view.onTask(data);
                }
            }

            @Override
            public void onError(int code, String msg) {
                if (view!=null){
                    view.onFailure(code, msg);
                }
            }
        });
    }
}
